package com.hiep.connect.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.hiep.connect.shared.MyUser;

public class PostOnFriendEvent extends GwtEvent<PostOnFriendEventHandler> {
	public static Type<PostOnFriendEventHandler> TYPE = new Type<PostOnFriendEventHandler>();
	private MyUser source;

	public MyUser getSource() {
		return source;
	}

	public MyUser getTarget() {
		return target;
	}

	public String getMessage() {
		return message;
	}

	private MyUser target;
	private String message;

	public PostOnFriendEvent(MyUser source, MyUser target, String message) {
		this.source = source;
		this.target = target;
		this.message = message;
	}

	@Override
	public Type<PostOnFriendEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(PostOnFriendEventHandler handler) {
		handler.onUserPost(this);
	}
}
